// Vue Router 的入口文件
import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router";

// 定义路由类型，便于类型检查和代码提示
const routes: Array<RouteRecordRaw> = [
    {
        path: "/login",
        name: "Login",
        component: () => import("./views/login/index.vue"),
    },
    {
        path: "/dashboard",
        name: "Dashboard",
        component: () => import("../views/dashboard/index.vue"),
    },
];

// 创建路由实例，并传入路由配置
const router = createRouter({
    history: createWebHistory(),
    routes,
});

export default router;